package com.ruoyi.teacher.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teacher.mapper.ScheduleMapper;
import com.ruoyi.teacher.domain.Schedule;
import com.ruoyi.teacher.service.IScheduleService;

/**
 * 排班Service业务层处理
 * 
 * @author wwb
 * @date 2022-12-25
 */
@Service
public class ScheduleServiceImpl implements IScheduleService 
{
    @Autowired
    private ScheduleMapper scheduleMapper;

    /**
     * 查询排班
     * 
     * @param id 排班主键
     * @return 排班
     */
    @Override
    public Schedule selectScheduleById(Long id)
    {
        return scheduleMapper.selectScheduleById(id);
    }

    /**
     * 查询排班列表
     * 
     * @param schedule 排班
     * @return 排班
     */
    @Override
    public List<Schedule> selectScheduleList(Schedule schedule)
    {
        return scheduleMapper.selectScheduleList(schedule);
    }

    /**
     * 新增排班
     * 
     * @param schedule 排班
     * @return 结果
     */
    @Override
    public int insertSchedule(Schedule schedule)
    {
        return scheduleMapper.insertSchedule(schedule);
    }

    /**
     * 修改排班
     * 
     * @param schedule 排班
     * @return 结果
     */
    @Override
    public int updateSchedule(Schedule schedule)
    {
        return scheduleMapper.updateSchedule(schedule);
    }

    /**
     * 批量删除排班
     * 
     * @param ids 需要删除的排班主键
     * @return 结果
     */
    @Override
    public int deleteScheduleByIds(Long[] ids)
    {
        return scheduleMapper.deleteScheduleByIds(ids);
    }

    /**
     * 删除排班信息
     * 
     * @param id 排班主键
     * @return 结果
     */
    @Override
    public int deleteScheduleById(Long id)
    {
        return scheduleMapper.deleteScheduleById(id);
    }
}
